<template>
	<view style="background: #f0f3f3;width: 100vw;display: flex;justify-content: center;align-items: center; position: relative;" :style="{
		minHeight:`100vh`
	}"
	>		<view style="width: 70vw;position: absolute;bottom: 3vh;transform: translateX(-50%);left:50%;">
				<u-button class="tt"  type="primary"  @click="gonext()"  text="开始考试"></u-button>
		</view>
		<view v-if="getUserinfo.IdCardNo" :style="{height:`calc(90vh - ${eHeight+4}px)`,marginBottom:`${eHeight+4}px`}" style="width: 90vw;border-radius:2vw; background-color: #fff;overflow: hidden;font-size: 22px;">

			<view
			
				style="height:100%; display: flex;padding:1vw 1vw; justify-content: center; box-sizing: border-box; overflow-y: auto;">
				<view   style="width: 80vw;display: flex; flex-direction: column;">
				<view style="width: 80vw;display: flex; flex-direction: column; align-items: center; padding: 0 1vw;font-weight: bolder;  "
					 >
					<image :src="`http://${uni.getStorageSync('config').ip}:${uni.getStorageSync('config').port}/Files//Photos/${getUserinfo.IdCardNo}.jpg`" style="width: 8vw;margin: 2vw auto;" mode="widthFix"></image>
					<view style="display: flex; margin-top: 2vh;">
						<view style="flex:1;display: flex;flex-direction: column;margin-right: 4vw;">
							<view style="width: 100%; display: flex;align-items: center;margin-bottom:2vh;margin-top: 1vh;">
								<view style="min-width: 10vw;">姓名:</view>
								<view style="margin-left: 2vw;">{{getUserinfo.Name}}</view>
							</view>
							<view style="width: 100%; display: flex;align-items: center;margin-bottom:2vh;">
								<view style="min-width: 10vw;">考生性别:</view>
								<view style="margin-left: 2vw;">{{getUserinfo.Gender}}</view>
							</view>
							<view style="width: 100%; display: flex;align-items: center;margin-bottom:2vh;">
								<view style="min-width: 10vw;">证件号:</view>
								<view style="margin-left: 2vw;">{{getUserinfo.IdCardNo}}</view>
							</view>
							<view style="width: 100%; display: flex;align-items: center;margin-bottom:2vh;">
								<view style="min-width: 10vw;">准考证号:</view>
								<view style="margin-left: 2vw;">{{getUserinfo.AdmissionNo}}</view>
							</view>
							<view style="width: 100%; display: flex;align-items: center;margin-bottom:2vh;">
								<view style="min-width: 10vw;">科目:</view>
								<view style="margin-left: 2vw;">{{getUserinfo.SubjectName}}</view>
							</view>
					
						</view>
						<view style="flex:1;display: flex;flex-direction: column;">
							
							<view style="width: 100%; display: flex;align-items: center;margin-bottom:2vh;">
								<view style="min-width: 10vw;">开考时间:</view>
								<view style="margin-left: 2vw;">{{getUserinfo.StartTimeStr}}</view>
							</view>
							<view style="width: 100%; display: flex;align-items: center;margin-bottom:2vh;">
								<view style="min-width: 10vw;">结束时间:</view>
								<view style="margin-left: 2vw;">{{getUserinfo.EndTimeStr}}</view>
							</view>
							<view style="width: 100%; display: flex;align-items: center;margin-bottom:2vh;">
								<view style="min-width: 10vw;">考场:</view>
								<view style="margin-left: 2vw;">{{getUserinfo.ExaminationRoom}}</view>
							</view>
							<view style="width: 100%; display: flex;align-items: center;margin-bottom:2vh;">
								<view style="min-width: 10vw;">考位:</view>
								<view style="margin-left: 2vw;">{{getUserinfo.SeatNo}}</view>
							</view>
							<view style="width: 100%; display: flex;align-items: center;margin-bottom:2vh;">
								<view style="min-width: 10vw;">时长:</view>
								<view style="margin-left: 2vw;">{{getUserinfo.TimeLimit}}分钟</view>
							</view>
						</view>
					</view>
				

				</view>
		</view>
			</view>
		</view>
		<view   style="width: 20vw;height: 10vh;display: flex;justify-content:center;align-items: center;" v-else>
				个人信息加载中...
		</view>
	</view>
</template>

<script>
	import {
		mapState,
		mapGetters,
		mapMutations,
		mapActions
	} from 'vuex';
			
	import {
		mixins
	} from "../../mixins/app.js";
	export default {
		data() {
			return {
			uni: uni ,// Add uni to data
			config:{},
			eHeight:0
			};
		},
		computed: {
			...mapGetters('user',['getUserinfo']),
				uni() {
							return uni;
						}
		},
		mounted() {
		this.$nextTick(() => {
			uni.createSelectorQuery().select('.tt').boundingClientRect(data => {
				this.eHeight = data?.height
			}).exec();
		})	
		},
		mixins: [mixins],
		created() {
		this.Agetuser()	
		this.config=uni.getStorageSync('config')
		console.log(this.config,'2222')
		},
		methods:{
			...mapActions('user',{
				Agetuser:'Agetuser'
			}),
		
		gonext(){
			this.$Router.push('/pages/notice/notice')
		}
		}
	}
</script>

<style lang="scss">
::v-deep .u-button__text{
	font-size: 20px!important;
}
</style>
